-
Notifications
You must be signed in to change notification settings - Fork 13.6k
ignore head usages from ignored candidates #144991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
r? @SparrowLii rustbot has assigned @SparrowLii. Use |
|
This comment has been minimized.
This comment has been minimized.
@bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…=<try> ignore usages from ignored candidates
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
420245d
to
32de28a
Compare
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (5c09e88): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.5%, secondary 2.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 463.057s -> 466.661s (0.78%) |
@bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…=<try> ignore usages from ignored candidates
@bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…=<try> ignore head usages from ignored candidates
This comment has been minimized.
This comment has been minimized.
1bb82cc
to
613842e
Compare
This comment has been minimized.
This comment has been minimized.
613842e
to
c2e2c9e
Compare
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (546cb5f): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.3%, secondary 1.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.4%, secondary -4.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 465.439s -> 465.953s (0.11%) |
c2e2c9e
to
37ebce3
Compare
This comment has been minimized.
This comment has been minimized.
37ebce3
to
aa3691e
Compare
7e3e956
to
8afe306
Compare
r=me if CI passes |
@bors r=BoxyUwU uwu |
…=BoxyUwU ignore head usages from ignored candidates Fixes rust-lang/trait-system-refactor-initiative#210. The test now takes 0.8s to compile, which seems good enough to me. We are actually still walking the entire graph here, we're just avoiding unnecessary reruns. The basic idea is that if we've only accessed a cycle head inside of a candidate which didn't impact the final result of our goal, we don't need to rerun that cycle head even if is the used provisional result differs from the final result. We also use this information when rebasing goals over their cycle heads. If a goal doesn't actually depend on the result of that cycle head, rebasing always succeeds. However, we still need to make sure we track the fact that we relied on the cycle head at all to avoid query instability. It is implemented by tracking the number of `HeadUsages` for every head while evaluating goals. We then also track the head usages while evaluating a single candidate, which the search graph returns as `CandidateHeadUsages`. If there is now an always applicable candidate candidate we know that all other candidates with that source did not matter. We then call `fn ignore_candidate_head_usages` to remove the usages while evaluating this single candidate from the total. If the final `HeadUsages` end up empty, we know that the result of this cycle head did not matter when evaluating its nested goals.
Fixes rust-lang/trait-system-refactor-initiative#210. The test now takes 0.8s to compile, which seems good enough to me. We are actually still walking the entire graph here, we're just avoiding unnecessary reruns.
The basic idea is that if we've only accessed a cycle head inside of a candidate which didn't impact the final result of our goal, we don't need to rerun that cycle head even if is the used provisional result differs from the final result.
We also use this information when rebasing goals over their cycle heads. If a goal doesn't actually depend on the result of that cycle head, rebasing always succeeds. However, we still need to make sure we track the fact that we relied on the cycle head at all to avoid query instability.
It is implemented by tracking the number of
HeadUsages
for every head while evaluating goals. We then also track the head usages while evaluating a single candidate, which the search graph returns asCandidateHeadUsages
. If there is now an always applicable candidate candidate we know that all other candidates with that source did not matter. We then callfn ignore_candidate_head_usages
to remove the usages while evaluating this single candidate from the total. If the finalHeadUsages
end up empty, we know that the result of this cycle head did not matter when evaluating its nested goals.